<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const animal = {
        money: 1000,
      };
      const cat = {
        // money:100,
        __proto__: animal,
      };
      cat.money = 100;
      console.log(cat.money); //100
      cat.__proto__.money = 50;
      console.log(animal.money); //1000
    </script>
  </body>
</html>
